	
	 
<script type="text/javascript">
	 

	function laporan_langsung(pageURL, title,w,h){

		var periode=document.getElementById('periode').value;
		var kode_wil=document.getElementById('kode_wil').value;
		var jenis_kb=document.getElementById('jenis_kb').value;
		 var site 		= "<?php echo site_url()?>";
		if ((kode_wil=='')||(jenis_kb==''))
		{
			alert('Isilah Kode Wilayah / Jenis Kendaraan');
		}
		else
		{
			//var left = (screen.width/2)-(w/2);
			//var top = (screen.height/2)-(h/2);
			//var targetWin = window.open ('<?=site_url();?>/laporan/report/'+periode+'/'+kode_wil+'/'+jenis_kb, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
			location.href = site+"/piutang_pajak_per_wilayah/report_pdf_langsung/"+periode+'/'+kode_wil+'/'+jenis_kb;
			document.getElementById('tanggal_awal').value='';
			document.getElementById('tanggal_akhir').value='';

		}
	}
 
	function laporan_preview(pageURL, title,w,h){

		var periode=document.getElementById('periode').value;
		var kode_wil=document.getElementById('kode_wil').value;
		var jenis_kb=document.getElementById('jenis_kb').value;
		 var site 		= "<?php echo site_url()?>";
		if ((kode_wil=='')||(jenis_kb==''))
		{
			alert('Isilah Kode Wilayah / Jenis Kendaraan');
		}
		else
		{
			var left = (screen.width/2)-(w/2);
			var top = (screen.height/2)-(h/2);
			var targetWin = window.open ('<?=site_url();?>/piutang_pajak_per_wilayah/report_pdf_preview/'+periode+'/'+kode_wil+'/'+jenis_kb, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
			//location.href = site+"/piutang_pajak_per_wilayah/report_pdf/"+periode+'/'+kode_wil+'/'+jenis_kb;
			document.getElementById('tanggal_awal').value='';
			document.getElementById('tanggal_akhir').value='';

		}
	}
	 

</script>

 
		
 
	 

<section class="grid_12">
	<div class="block-border">
		<?php 
		$attributes = array('name' => 'form1', 'id' => 'form1', 'class'=>'block-content form');
		echo form_open_multipart('piutang_pajak_per_wilayah/index', $attributes);
		?>
			<h1>Piutang Pajak Per Wilayah</h1>
			
			<div class="block-controls">
				
				<ul class="controls-buttons">
						<td width='15%'>
							Tahun:&nbsp;<input type=text name='periode' id='periode' size="4" value=<?=date('Y')?>>
						</td> 
						
						<td>		
								<select name="jenis_kb" id="jenis_kb" >
									<option value="">--Pilih JENIS KENDARAAN--</option>
									<?php
										foreach($jenis_kb->result()  as $row)
										{
											echo '<option value="'.$row->kode.'">'.$row->kode.'-'.$row->uraian.'</option>';
										}						
									?>
									<option value="all">SEMUA JENIS KENDARAAN</option>
								</select>
						</td>
				 
						<td>
							<button type='submit' name='' value='Lihat' style='cursor:pointer' >VIEW</button>
							<button type="button" onclick="laporan_preview('<?=site_url();?>/piutang_pajak_per_wilayah/index/','name',800,600)"><img src="<?=base_url()?>asset/admin/images/icons/fugue/tick-circle.png" width="16" height="16">Print Preview</button> 

							<button type="button" onclick="laporan_langsung()">REKAP PDF</button>
						</td>
				 
					<li class="sep"></li>
					<li> </li>
				</ul>
				
			</div>
		
			<div class="no-margin"><table class="table" cellspacing="0" width="100%">
			
				<thead>
					<tr> 
						<!--<th align="left" valign="top" scope="col">&nbsp;</th>-->
						<th align="left" valign="top" scope="col">Nomor</th>
						<th align="left" valign="top" scope="col">WILAYAH</th>
						<th align="left" valign="top" scope="col">JENIS</th>
						<th align="left" valign="top" scope="col">PIUTANG PAJAK</th>
						<th align="left" valign="top" scope="col">YANG SUDAH BAYAR</th>
						<th align="left" valign="top" scope="col">SISA PAJAK</th> 
					</tr>
				</thead>
				
				
			
			</table></div>
			
			 
			 
				
		</form>
	</div>
</section>	
